
<div class="content">
	<h3>{{ 'Manage your projects' | translate }}</h3>

	<div id="alertsBox"></div>

	<div class="panel panel-default">
		<accordion close-others="true">
			<accordion-group is-open="isFormOpen">
				<accordion-heading>
					<span class="page_title">{{ formTitle }}</span>
					<i class="pull-right fa" ng-class="{'fa-chevron-down': isFormOpen, 'fa-chevron-right': !isFormOpen}"></i>
				</accordion-heading>
				<form name="projectForm" id="projectForm">
					<div class="input-group form_field first_field">
						<span class="input-group-addon">{{ 'Name' | translate }}</span>
						<input type="text" name="project_name" id="project_name" class="form-control" ng-model="projectModel.name" />
					</div>
					<div class="input-group form_field">
						<span class="input-group-addon">{{ 'Customer' | translate }}</span>
						<select name="project_customer" id="project_customer" class="form-control" ng-model="projectModel.customer">
							<option ng-repeat="customer in customerList" value="{{ customer.key }}">{{ customer.name }}</option>
						</select>
					</div>
					<!--<div class="input-group form_field first_field">
						<span class="input-group-addon">Compenso</span>
						<input type="number" name="project_eur" id="project_eur" class="form-control" ng-model="projectModel.eur" />
					</div>-->
					<div class="input-group form_field first_field">
						<span class="input-group-addon">{{ 'Project payment type' | translate }}</span>
						<select ng-model="projectModel.unatantum" class="form-control">
					        <option value="1" selected="selected">{{ 'End of project' | translate }}</option>
					        <option value="0">{{ 'Hours payment' | translate }}</option>
					    </select>
					</div>

					<!--<div class="input-group form_field first_field">
						<span class="input-group-addon">Addizionali incluse</span>
						<div class="form-control">
					        <label class="btn btn-primary" ng-model="projectModel.irpef4percent" btn-checkbox>IRPEF 4%</label>
					        <label class="btn btn-primary" ng-model="projectModel.marcadabollo" btn-checkbox>Marca da bollo</label>
					    </div>
					</div>-->

					<div class="input-group form_field">
						<span class="input-group-addon">{{ 'Development progress' | translate }}</span>
						<!--<input type="text" name="project_unatantum" id="project_unatantum" class="form-control" ng-model="project.unatantum" />-->
						<input type="number" name="project_progress" min="0" max="100" id="project_progress" class="form-control" ng-model="projectModel.progress_work" ng-change="alert('Dont fired :(');fillModel(projectModel);" />
						<span class="input-group-addon">%</span>
					</div>
					<div class="input-group form_field first_field full_field form_button" style="float:right;">
						<button ng-show="!isInEditMode" class="btn btn-default standard_button" type="button" ng-click="saveProject(projectModel)">
							{{ 'Save project' | translate }} <i class="fa fa-floppy-o"></i>
						</button>
						<button ng-show="isInEditMode" class="btn btn-default standard_button" type="button" ng-click="editProject(projectModel)">
							{{ 'Edit project' | translate }} <i class="fa fa-floppy-o"></i>
						</button>
						<button class="btn btn-default standard_button" ng-click="resetEditSelection()"><!-- ng-show="isInEditMode" -->
							{{ 'Cancel' | translate }} <i class="fa fa-ban"></i>
						</button>
					</div>
				</form>
			</accordion-group>
		</accordion>
	</div>
	<div class="panel panel-default">
		<div class="panel-heading">
			<span class="page_title">{{ 'View your projects' | translate }}</span>
		</div>
		<div class="panel-body">

			<form>
				<div class="input-group search_form form_field">
					<!--<input type="text" name="search_customer" id="search_customer" class="form-control" placeholder="Search..." ng-model="customerSearch" />-->
					<span class="input-group-addon">{{ 'Search' | translate }} <i class="fa fa-search"></i></span>
					<input type="text" ng-model="filterOptions.filterText" ng-change="search()" class="input-large search-query form-control" placeholder="Search">
				</div>
			</form>

			<br/>
			<br/>
			<br/>

			<div class="gridStyle" ng-grid="gridOptions"></div>
		</div>

	</div>

</div>